home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / MPW / gzip 1.2.2 / msdos / Makefile.djg < prev    next >
Encoding:
Makefile  |  1993-06-22  |  5.6 KB  |  227 lines  |  [TEXT/MPS ]

  1. # Makefile for gzip (GNU zip)    -*- Indented-Text -*-
  2. # Copyright (C) 1992-1993 Jean-loup Gailly and the Free Software Foundation
  3. # Modified for GNUish make/MS_SH200/DJGPP 1.09+ by Eric Backus
  4.  
  5. # This program is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 2, or (at your option)
  8. # any later version.
  9.  
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. # GNU General Public License for more details.
  14.  
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program; if not, write to the Free Software
  17. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  
  19. # $Id: Makefile.djg,v 1.2 1993/06/12 06:55:22 jloup Exp $
  20.  
  21. #### Start of system configuration section. ####
  22.  
  23. .SUFFIXES: .o
  24. LONGARGS = gcc:rm
  25.  
  26. srcdir = .
  27. VPATH = .
  28.  
  29. CC = gcc
  30. CPP = gcc -O -E
  31.  
  32. INSTALL = install -c
  33. INSTALL_PROGRAM = $(INSTALL)
  34. INSTALL_DATA = $(INSTALL) -m 644
  35.  
  36. # tailor.h defines things for DJGPP so nothing is needed here
  37. DEFS =
  38. LIBS =
  39. ALLOCA =
  40.  
  41. # additional assembly sources for particular systems may be required.
  42. OBJA = match.o
  43.  
  44. SEDCMD = 1d
  45.  
  46. CFLAGS = -O2 -finline-functions -fomit-frame-pointer
  47. LDFLAGS = -s
  48.  
  49. X=.exe
  50. # For OS/2 or MSDOS, use: X=.exe
  51.  
  52. O=.o
  53. # For OS/2 or MSDOS, use: O=.obj
  54.  
  55. prefix = /usr/local
  56. exec_prefix = $(prefix)
  57.  
  58. bindir = $(exec_prefix)/bin
  59. datadir = $(prefix)/lib
  60. libdir = $(prefix)/lib
  61. infodir = $(prefix)/info
  62.  
  63. # Extension (not including `.') for the installed manual page filenames.
  64. manext = 1
  65. # Where to install the manual pages.
  66. mandir = $(prefix)/man/man$(manext)
  67.  
  68. #### End of system configuration section. ####
  69.  
  70. SHELL = /bin/sh
  71.  
  72. LOADLIBES = $(LIBS)
  73.  
  74. TAR = tar
  75.  
  76. SRCS = gzip.c zip.c deflate.c trees.c bits.c unzip.c inflate.c util.c crypt.c\
  77.        lzw.c unlzw.c unpack.c unlzh.c makecrc.c getopt.c alloca.c match.S
  78.  
  79. OBJ1 = gzip$(O) zip$(O) deflate$(O) trees$(O) bits$(O) unzip$(O) inflate$(O) \
  80.        util$(O)
  81. OBJ2 = crypt$(O) lzw$(O) unlzw$(O) unpack$(O) unlzh$(O) getopt$(O) $(OBJA) \
  82.        $(ALLOCA)
  83.  
  84. HDRS = gzip.h lzw.h tailor.h revision.h crypt.h getopt.h
  85.  
  86. .c$O:
  87.     $(CC) -c $(DEFS) $(CFLAGS) $<
  88.  
  89. #.PHONY: default all force test check
  90.  
  91. default:  all
  92. all:    gzip$X zcmp zdiff zmore znew zforce gzexe
  93. force:
  94.  
  95. install: all
  96.     for f in gzip$X zcmp zdiff zmore znew zforce gzexe; do \
  97.       $(INSTALL_PROGRAM) $${f} $(bindir)/$${f}; done
  98.     for f in gunzip$X zcat$X ; do \
  99.       rm -f $(bindir)/$${f}; ln $(bindir)/gzip$X $(bindir)/$${f}; done
  100.     -cd $(srcdir); \
  101.       for f in gzip gunzip zcat zcmp zmore znew zforce gzexe; do \
  102.       rm -f $(mandir)/$${f}.$(manext); \
  103.       $(INSTALL_DATA) $${f}.1 $(mandir)/$${f}.$(manext); done
  104.     -cd $(srcdir); for f in gzip.info* ; do $(INSTALL_DATA) $${f} \
  105.       $(infodir)/$${f}; done
  106.  
  107. uninstall: force
  108.     -cd $(bindir); rm -f gzip$X gunzip$X zcat$X \
  109.       zcmp zdiff zmore znew zforce gzexe
  110.     -for f in gzip gunzip zcat zcmp zmore znew gzexe; do \
  111.       rm -f $(mandir)/$${f}.$(manext); done
  112.     -cd $(infodir); rm -f gzip.info*
  113.  
  114. # install all files and replace compress (not recommended)
  115. install_compress: install
  116.     -test -f $(bindir)/compress.old || \
  117.       mv $(bindir)/compress$X $(bindir)/compress.old
  118.     ln $(bindir)/gzip$X $(bindir)/compress$X
  119.     rm -f $(bindir)/uncompress$X
  120.     ln $(bindir)/gzip$X $(bindir)/uncompress$X
  121.  
  122. test: check
  123. check:    all
  124.     ./gzip -5 < $(srcdir)/texinfo.tex > _gztest.z
  125.     # Either GNUish make or MS_SH has trouble with backquotes
  126.     #@if test `wc -c < _gztest.z` -ne 30890; then \
  127.     #   echo FAILED gzip test: incorrect size; rm -f _gztest*; exit 1; \
  128.     #   else :; fi
  129.     @echo Should be 30890:\\c
  130.     @wc -c < _gztest.z
  131.     rm -f _gztest
  132.     ./gzip -d _gztest.z
  133.     @if cmp _gztest $(srcdir)/texinfo.tex; then \
  134.        echo gzip test OK; \
  135.     else \
  136.        echo FAILED gzip test: incorrect decompress; \
  137.     fi
  138.     rm -f _gztest*
  139.  
  140. TAGS: $(SRCS) $(HDRS)
  141.     cd $(srcdir); etags $(SRCS) $(HDRS)
  142.  
  143. Makefile: Makefile.in ./config.status
  144.     ./config.status
  145.  
  146. ./config.status: configure
  147.     $(srcdir)/configure --srcdir=$(srcdir) --no-create
  148.  
  149. configure: configure.in
  150.     @echo Warning: configure is out of date
  151. #    cd $(srcdir); autoconf
  152.  
  153. clean:
  154.     rm -f *$O gzip$X gunzip$X zcat$X a.out core gzip
  155.     rm -f zcmp zdiff zmore znew zforce gzexe _gztest*
  156.     rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.log
  157.     rm -f *.pg *.pgs *.toc *.tp *.tps *.vr *.vrs
  158.  
  159. mostlyclean: clean
  160.  
  161. distclean: clean
  162.     rm -f Makefile config.status
  163.  
  164. realclean: distclean
  165.     rm -f TAGS gzip.info*
  166.  
  167. # Actual build-related targets
  168.  
  169. gzip$X:    gzip
  170.     aout2exe gzip
  171.  
  172. gzip:    $(OBJ1) $(OBJ2)
  173.         echo $(OBJ1) > gzip.rsp
  174.         echo $(OBJ2) $(LIBS) >> gzip.rsp
  175.     $(CC) $(LDFLAGS) -o $@ @gzip.rsp
  176.     del gzip.rsp
  177.  
  178. gzip$O zip$O deflate$O trees$O bits$O unzip$O inflate$O: gzip.h tailor.h
  179. util$O lzw$O unlzw$O unpack$O unlzh$O crypt$O: gzip.h tailor.h
  180.  
  181. gzip$O unlzw$O: revision.h lzw.h
  182.  
  183. bits$O unzip$O util$O zip$O: crypt.h
  184.  
  185. gzip$O getopt$O: getopt.h
  186.  
  187. match$O: match.S
  188.     $(CC) -c match.S
  189.  
  190. zcmp: zcmp.in
  191.     sed "$(SEDCMD)" $(srcdir)/zcmp.in > zcmp
  192.     chmod 755 zcmp
  193.  
  194. zdiff: zdiff.in
  195.     sed "$(SEDCMD)" $(srcdir)/zdiff.in > zdiff
  196.     chmod 755 zdiff
  197.  
  198. zmore: zmore.in
  199.     sed "$(SEDCMD)" $(srcdir)/zmore.in > zmore
  200.     chmod 755 zmore
  201.  
  202. znew: znew.in
  203.     sed "$(SEDCMD)" $(srcdir)/znew.in > znew
  204.     chmod 755 znew
  205.  
  206. zforce: zforce.in
  207.     sed "$(SEDCMD)" $(srcdir)/zforce.in > zforce
  208.     chmod 755 zforce
  209.  
  210. gzexe: gzexe.in
  211.     sed "$(SEDCMD)" $(srcdir)/gzexe.in > gzexe
  212.     chmod 755 gzexe
  213.  
  214. gzip.info: gzip.texi
  215.     cd $(srcdir); makeinfo gzip.texi
  216.  
  217. gzip.dvi: gzip.texi
  218.     cd $(srcdir); texi2dvi gzip.texi
  219.  
  220. gzip.doc: gzip.1
  221.     cd $(srcdir); nroff -man gzip.1 | col -b | uniq > gzip.doc
  222.  
  223. # Prevent GNU make v3 from overflowing arg limit on SysV.
  224. .NOEXPORT:
  225.  
  226. # end of file
  227.